/*
  ID: nemokin1
  PROG: money
  LANG: C++
*/
#include <vector>
#include <list>
#include <assert.h>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <fstream>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
 
using namespace std;
 
#define REP(i,n) for(int i=0; i<(n); ++i)
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define FORD(i,a,b) for(int i=(a);i>=b;--i)
#define FOREACH(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define ALL(c) (c).begin(),(c).end()
 
#define debug(x) cerr<< #x << " = " << (x) << "\n";
#define debugv(v) cerr << #v << " = "; FOREACH(it,v) cerr << *it <<","; cerr << "\n";
#define SIZE(a)  (int(a.size()))
 
template<typename T> inline void checkMax(T& a, T b) {if (b>a) a=b;}
template<typename T> inline void checkMin(T& a, T b) {if (b<a) a=b;}
 
typedef long long LL;
typedef vector<int> VI;
typedef vector<string> VS;
typedef long double ld;
const int INF = 1000000000;

int main() {
    freopen("money.in","r",stdin);freopen("money.out","w",stdout);
    LL dp[26][10001];
    memset(dp,0,sizeof(dp));
    for(int i = 0; i <= 26; i++){
	dp[i][0] = 1;
    }
    int N,M;
    cin >> M >> N;
    VI rr;
    for(int i = 0; i < M; i++) {int k;cin >> k;rr.push_back(k);}
    for(int i = 1; i <= M; i++){
	for(int j = 1; j <= N; j++){
	    dp[i][j] = dp[i-1][j];
	    if(j-rr[i-1] >= 0) dp[i][j]+=dp[i][j-rr[i-1]];
	}
    }
    cout << dp[M][N] << endl;
    
    exit(0);
}
